<template>
  <div>
    <el-card class="box-card">
      <div v-for="o in List" :key="o" class="text item">
        <div style="margin-left: 40px; float: left">需求收集</div>
        <div style="margin-right: 40px; float: right">收集进度:{{o.etmsDemandResearch.peoplenums}}/{{o.peopleNumber}}</div>
        <div style="margin-left: 40px;margin-top: 20px; float: left; clear: both">
          需求标题:{{ o.demandTitle }}
        </div>
        <div style="margin-right: 40px;margin-top: 20px; float: right">截止时间:{{o.endTime}}</div>
      <div style="margin-top: 80px;clear: both">
        <el-divider></el-divider>
      </div>
      </div>
      
    </el-card>
  </div>
</template>

<style>
.text {
  font-size: 14px;
}

.item {
  padding: 18px 0;
}

.box-card {
  width: 600px;
}
</style>
<script>
import {findMyDemand} from '@/api/demand'
export default {
  data() {
    return {
      List: {
        demandTableId: "",
        demandTitle: "",
        demandInstructions: "",
        region: "",
        startTime: "",
        endTime: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
        trainingMethods: "",
        peopleNumber: "",
        demandReason: "",
        demandDept: "",
        etmsDemandResearch: {
          peoplenums: "11",
        },
      },
    };
  },
  created: function(){
    this.onSubmit()
  },
  methods: {
    onSubmit() {
      findMyDemand(1).then(
        (res) => {
          this.List = res.data;
          console.log(res);
        }
      ).catch()
    // this.$axios
    //     .post("/findMyDemand/1")
    //     .then((res) => {
    //       this.List = res.data.data;
    //       console.log(res.data.data);
    //     })
    //     .catch();
    //   console.log("submit!");
    },
  },
};
</script>
